package com.wframe.project.jnd.wx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by lwb on 2017/4/22.
 */
@RequestMapping("/we")
@Controller
public class PageController {

    @RequestMapping(value = "/collect", method = RequestMethod.GET)
    public String showCollect() {
        return "/wesite/view/home/my-collect";
    }

    @RequestMapping(value = "/sign/register", method = RequestMethod.GET)
    public String showRegister() {
        return "/wesite/view/sign/register";
    }

    @RequestMapping(value = "/sign/accountRegister", method = RequestMethod.GET)
    public String showPhoneRegister() {
        return "/wesite/view/sign/register-account";
    }

    @RequestMapping(value = "/sign/protocol", method = RequestMethod.GET)
    public String showProtocol() {
        return "/wesite/view/sign/protocol";
    }

    @RequestMapping(value = "/message", method = RequestMethod.GET)
    public String showError() {
        return "/wesite/view/message";
    }

    @RequestMapping(value = "/buyplan/add", method = RequestMethod.GET)
    public String showBuyplanAdd() {
        return "/wesite/view/buyplan/add";
    }

    @RequestMapping(value = "/purchaseTemplate/{id}", method = RequestMethod.GET)
    public String showPurchaseTemplate(@PathVariable String id, Model model) {
        model.addAttribute("id", id);
        return "/wesite/view/buyplan/list";
    }

    @RequestMapping(value = "/remind-time/{id}", method = RequestMethod.GET)
    public String showBuyplanRemind(@PathVariable String id, Model model) {
        model.addAttribute("id", id);
        return "/wesite/view/buyplan/remind-time";
    }

    @RequestMapping(value = "/products/{id}", method = RequestMethod.GET)
    public String showProducts(@PathVariable String id, Model model) {
        model.addAttribute("id", id);
        return "/wesite/view/buyplan/select-product";
    }

}
